package daybook.exception;

import daybook.Resources;

public class NotFoundException extends ApplicationException {
    public NotFoundException(String mesg) {
        super(mesg);
    }

    public NotFoundException(Throwable cause) {
        super(cause);
    }

    public NotFoundException(String mesg, Throwable cause) {
        super(mesg, cause);
    }

    public static NotFoundException of(String msg, Object... args) {
        final String errorMsg = String.format(Resources.get(msg), args);
        return new NotFoundException(errorMsg);
    }

    public static NotFoundException of(Throwable cause, String msg, Object... args) {
        final String errorMsg = String.format(Resources.get(msg), args);
        return new NotFoundException(errorMsg, cause);
    }
}
